//
//  IGameComponent.cpp
//  Components
//
//  Created by Jeppe Nielsen on 3/6/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#include "IGameComponent.hpp"

using namespace Typhoon;

IGameComponent::IGameComponent() {}
IGameComponent::~IGameComponent() {}

int IGameComponent::idCounter = 0;

void IGameComponent::AddData(int id, void* data) {
	if (id>=datas.size()) {
		for (int i=datas.size(); i<=id;i++)
		{
			datas.push_back(0);
		}
	}
	datas[id] = data;
}

void* IGameComponent::GetData(int id) {
	if (id>=datas.size()) return 0;
	return datas[id];
}